<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="moduleView" />
<script src="${staticPath}/lib/accounting/0.3.2/accounting.min.js"
	type="text/javascript"></script>
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						parent.document.getElementById("versionFrame").height = document.body.scrollHeight;
					});

	$('[data-accounting]').each(
			function() {
				var $this = $(this);
				if ($this.attr("data-accounting-precision")
						&& "" != $this.attr("data-accounting-precision")) {
					$this.html(accounting.formatMoney($this
							.attr("data-accounting"), "¥ ", $this
							.attr("data-accounting-precision") * 1));
				} else {
					$this.html(accounting.formatMoney($this
							.attr("data-accounting"), "¥ "));
				}
			});

	function funform(url, target) {
		window.open(url, target);
	}

	function tr_onclick(id) {
		var url = $("#" + id + "url").text();
		//window.open("${contextPath}/"+url+"/"+id+"/view"); 
		parent.location.href = "${contextPath}/" + url + "/" + id + "/view";
	}
</script>
</head>
<body>
<form:form name="listForm" modelAttribute="stmError" method="post" class="form-inline" role="form">
	    <input type="hidden" name="deleteIds" >
		<div class="o-l-search-builder f_9">
			<table class="table table-striped table-hover o-l-table table-bordered" id="table1">
				<thead class="t_1">
					<tr>
						<th>结算单号</th>
						<th>扣款项目</th>
						<th>应扣金额</th>
						<th>实扣金额</th>
						<th>备注</th>
						<th>结算类型</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${page.list}" var="paymentDetail">
						<tr>
							<td>${paymentDetail.billNo}</td>
							<td>${paymentDetail.debitItem}</td>
							<td data-accounting="${paymentDetail.shouldDeductAmount}"
								data-accounting-precision="4"></td>
							<td data-accounting="${paymentDetail.realDeductAmount}"
								data-accounting-precision="4"></td>
							<td>${paymentDetail.remarks}</td>
							<td><c:if test="${paymentDetail.statementType=='LJ00'}">联营结算</c:if>
								<c:if test="${paymentDetail.statementType=='ZJ00'}">自营结算</c:if>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
        </div>
		<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}" url="" total="${page.total}"/>
		<script type="text/javascript" src="${staticPath}/js/list.js"></script>
  </form:form>
</body>
</html>